{template '_header'}
<div class="page-heading">
    <h2>基础设置</h2>
</div>

<form id="setform"  action="" method="post" class="form-horizontal form-validate">
    <input type="hidden" id="tab" name="tab" value="{$_GPC['tab']}" />
    <ul class="nav nav-tabs" id="myTab">
        <li {if empty($_GPC['tab']) || $_GPC['tab']=='basic'}class="active"{/if}><a href="#tab_basic">基本设置</a></li>
        <li {if $_GPC['tab']=='comment'}class="active"{/if}><a href="#tab_comment">评论设置</a></li>
        <li {if $_GPC['tab']=='payset'}class="active"{/if}><a href="#tab_payset">支付设置</a></li>
    </ul>
    <div class="tab-content">
        <div class="tab-pane {if empty($_GPC['tab']) || $_GPC['tab']=='basic'}active{/if}" id="tab_basic">{template 'creditshop/set/tab_basic'}</div>
        <div class="tab-pane {if $_GPC['tab']=='comment'}active{/if}" id="tab_comment">{template 'creditshop/set/tab_comment'}</div>
        <div class="tab-pane {if $_GPC['tab']=='payset'}active{/if}" id="tab_payset">{template 'creditshop/set/tab_payset'}</div>
    </div>
    <div class="form-group">
        <label class="col-sm-2 control-label"></label>
        <div class="col-sm-9">
            {ifp 'creditshop.set.edit'}
                <input type="submit" value="提交" class="btn btn-primary"/>
            {/if}
        </div>
    </div>
</form>

<script language='javascript'>
    require(['bootstrap'],function(){
        $('#myTab a').click(function (e) {
            e.preventDefault();
            $('#tab').val( $(this).attr('href').replace('#tab_',''));
            $(this).tab('show');
        })
    });
</script>


{template '_footer'}